// const express = require("express");


const uploadVideo=require("../config/uoloadVideo")
const upload=require("../config/uploadconfig")
const uploadImg=require("../config/uploadImg")
const express=require("express")

const app = new express();

const router=express.Router()
const userController=require("../controller/userController")
const movieController=require("../controller/movieController")
router.get("/movie",userController.getAllMovie)
router.get("/enroll",userController.enroll)
router.get("/login",userController.login)
router.get("/anime",userController.anime)
router.get("/banner",userController.banner)
// router.get("/userNode",userController.userNode)
router.get("/deletes",userController.deletes)
router.get("/updateUser",userController.updateUser)
router.get("/searchUser",userController.searchUser)
router.get("/getUserDate",userController.getUserDate)
router.get("/addUser",userController.addUser)
router.get("/phoneLogin",userController.phoneLogin)
//电影数据
router.get("/getMovieDate",movieController.getMovieDate)
router.get("/deletesMovie",movieController.deletesMovie)
router.get("/updateMovie",movieController.updateMovie)
router.get("/searchMovie",movieController.searchMovie)

//个人中心
router.get("/updatePerson",userController.updatePerson)
router.post("/phone",userController.phone)
router.post("/upImg",upload.single("myFile"),userController.upImg)
//退出登录
router.get("/updateState",userController.updateState)
//评论
router.get("/addComment",userController.addComment)
router.get("/getComment",userController.getComment)
router.get("/delComment",userController.delComment)
router.get("/addName",userController.addName)
router.get("/getCommentDate",movieController.getCommentDate)
router.get("/searchComment",movieController.searchComment)
router.get("/deletesComment",movieController.deletesComment)
router.get("/getM",movieController.getM)
router.get("/addRate",movieController.addRate)
router.get("/getRate",movieController.getRate)
router.get("/getBannerDate",movieController.getBannerDate)
router.get("/searchBanner",movieController.searchBanner)
router.get("/deleteBanner",movieController.deleteBanner)
router.get("/Blood",movieController.Blood)
router.post("/upVideoImg",uploadImg.single("myFile"),movieController.upVideoImg)
//算法
router.get("/getRateData",movieController.getRateData)
router.get("/like",movieController.like)
router.post("/upVideo",uploadVideo.single("myFile"),movieController.upVideo)
module.exports=router
